package com.weilan.ark3.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weilan.ark3.entity.BasicConfigDto;
import com.weilan.ark3.entity.ControlDto;
import com.weilan.ark3.entity.ControlRtu;
import com.weilan.ark3.entity.page.TableDataInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T;

import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * 数据查询
 */
@Mapper
public interface TbSearchMapper {
    List<Object> listByTb(@Param("tbList") List<String> tbNameList, @Param("deviceId") String deviceId,
                          @Param("startTime") String startTime, @Param("endTime") String endTime);

    //查询一张表的全部数据
    List<Object> selectByTb(@Param("tb") String tb);

    Page<Object> listByModuleName(@Param("tbList") List<String> tbNameList, @Param("deviceId") String deviceId, @Param("slaveId") String slaveId,
                                  @Param("startTime") String startTime, @Param("endTime") String endTime, Page<T> build);

    int selectPvId();

    String listByBreakdown(@Param("startTime") String startTime, @Param("endTime") String endTime);

    String findTable(@Param("tbName") String tbName);


    boolean insertDevice(ControlRtu controlRtu);


    List<ControlRtu> findAllmessge(@Param("name")String name,@Param("num")Object num);

    boolean deletecontrortu();
    boolean deletebasicconfig();
    List<BasicConfigDto> selectAllbasic();
    void insertAllbasic(BasicConfigDto basicConfigDto);
    @MapKey("item")
    List<Map<String, Object>> selectSocPower(@Param("nameList") List<String> nameList, @Param("tableName") String date);
}

